package com.gosophia.accountManagement.action;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseAjaxAction;
import com.gosophia.commons.web.logAnnotation.LogRecord;
import com.gosophia.userManagement.dto.UserAccountDTO;
import com.gosophia.userManagement.ws.UserManagementWebService;
/**
 * 密码重置
 * @author wangxinbing
 *
 */
@Controller("ResetUserAccountPasswordAction")
@Scope("prototype")
public class ResetUserAccountPasswordAction extends BaseAjaxAction<UserAccountDTO> {

    private static final long serialVersionUID = 1L;

    @Autowired
    private UserManagementWebService userManagementWebService;
    
    private UserAccountDTO userAccountDTO;
    
    @Override
    @LogRecord(eventAction="账号管理--重置账号密码",eventTarget="userAccountDTO")
    public String _execute() throws Exception {
        userManagementWebService.updateUserAccountPassword(userAccountDTO);
        super.getRequestResult().setRsltCode("密码重置成功");
        super.getRequestResult().setRsltCode("0");
        return SUCCESS;
    }
    
    @Override
    public UserAccountDTO getDetailData() {
        return null;
    }

    public UserAccountDTO getUserAccountDTO() {
        return userAccountDTO;
    }

    public void setUserAccountDTO(UserAccountDTO userAccountDTO) {
        this.userAccountDTO = userAccountDTO;
    }

}
